<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/WEB-INF/facelets/template.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:f="http://java.sun.com/jsf/core">
    
    <ui:define name="content">
        <h:form id="showResultForm" prependId="false">
            <b><h:outputText value="Search Result"/></b>
            <p:dataGrid var="movie" value="#{headerControllerBean.showResultBackingBean.movies}" columns="1">
                <p:column >
                    <p:panel style = "box-shadow: 2px 2px 3px 1px grey">
                        <h:panelGrid columns="2">                         
                            <p:commandLink update="movieDetail" oncomplete="movieDialog.show()">
                                <p:graphicImage value="#{movie.movieCover}" style="width: 6.2em; height: 8.42em"/>
                                <f:setPropertyActionListener value="#{movie}" target="#{MoviePopUpBean.selectedMovie}"/>
                            </p:commandLink>
                            <h:panelGrid columns="1">
                                <p:commandLink update="movieDetail" oncomplete="movieDialog.show()">
                                    <p:graphicText fontName="Arial" fontStyle="bold" fontSize="14" value="#{movie.title}"
                                                   style="border: none"/>
                                    <f:setPropertyActionListener value="#{movie}" target="#{MoviePopUpBean.selectedMovie}"/>
                                </p:commandLink>
                                <p:separator/>
                                <h:outputText value ="#{movie.description}"/>
                            </h:panelGrid>
                        </h:panelGrid>
                    </p:panel>
                </p:column> 
            </p:dataGrid>
            <ui:include src="movieInfoPopUp.xhtml"/>
        </h:form>
    </ui:define>
   
</ui:composition>
